!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[DocumentMedia]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[DocumentMedia]"]=t(require("react")):e["rb_wixui.thunderbolt[DocumentMedia]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={5329:function(t){"use strict";t.exports=e},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}const u=s(32),h=s(o),l=e=>{h(e),u(e)},d=(s(c),["aria-id","aria-metadata","aria-type"]),g=(e,t)=>Object.entries(e).reduce(((e,[i,a])=>(t.includes(i)||(e[i]=a),e)),{}),p=e=>{const{role:t,tabIndex:i,tabindex:a,screenReader:n,lang:r,ariaAttributes:o={}}=e,c=Object.entries(o).reduce(((e,[t,i])=>({...e,[`aria-${t}`.toLowerCase()]:i})),{});return{role:t,tabIndex:i??a,screenReader:n,ariaAttributes:g(c,d),lang:r}},_=e=>Object.entries(e).reduce(((e,[t,i])=>(t.includes("data-")&&(e[t]=i),e)),{});var T="jhxvbR";const m="v1",f=2,I=1920,L=1920,E=1e3,A=1e3,b={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},O={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},M={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},w={[M.CENTER]:{x:.5,y:.5},[M.TOP_LEFT]:{x:0,y:0},[M.TOP_RIGHT]:{x:1,y:0},[M.TOP]:{x:.5,y:0},[M.BOTTOM_LEFT]:{x:0,y:1},[M.BOTTOM_RIGHT]:{x:1,y:1},[M.BOTTOM]:{x:.5,y:1},[M.RIGHT]:{x:1,y:.5},[M.LEFT]:{x:0,y:.5}},y={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},G={BG:"bg",IMG:"img",SVG:"svg"},R={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},C={classic:1,super:2},S={radius:"0.66",amount:"1.00",threshold:"0.01"},F={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},P=25e6,N=[1.5,2,4],k={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},v={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},x={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},B={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",AVIF:"avif",UNRECOGNIZED:"unrecognized"},H={AVIF:"AVIF",PAVIF:"PAVIF"};B.JPG,B.JPEG,B.JPE,B.PNG,B.GIF,B.WEBP;function Y(e,...t){return function(...i){const a=i[i.length-1]||{},n=[e[0]];return t.forEach((function(t,r){const o=Number.isInteger(t)?i[t]:a[t];n.push(o,e[r+1])})),n.join("")}}function U(e){return e[e.length-1]}const $=[B.PNG,B.JPEG,B.JPG,B.JPE,B.WIX_ICO_MP,B.WIX_MP,B.WEBP,B.AVIF],D=[B.JPEG,B.JPG,B.JPE];function j(e,t,i){return i&&t&&!(!(a=t.id)||!a.trim()||"none"===a.toLowerCase())&&Object.values(b).includes(e);var a}function z(e,t,i){return function(e,t,i=!1){return!((Z(e)||q(e))&&t&&!i)}(e,t,i)&&(function(e){return $.includes(ee(e))}(e)||function(e,t=!1){return W(e)&&t}(e,i))&&!/(^https?)|(^data)|(^\/\/)/.test(e)}function V(e){return ee(e)===B.PNG}function Z(e){return ee(e)===B.WEBP}function W(e){return ee(e)===B.GIF}function q(e){return ee(e)===B.AVIF}const J=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),X=["\\.","\\*"],Q="_";function K(e){return function(e){return D.includes(ee(e))}(e)?B.JPG:V(e)?B.PNG:Z(e)?B.WEBP:W(e)?B.GIF:q(e)?B.AVIF:B.UNRECOGNIZED}function ee(e){return(/[.]([^.]+)$/.exec(e)&&/[.]([^.]+)$/.exec(e)[1]||"").toLowerCase()}function te(e,t,i,a,n){let r;return r=n===O.FILL?function(e,t,i,a){return Math.max(i/e,a/t)}(e,t,i,a):n===O.FIT?function(e,t,i,a){return Math.min(i/e,a/t)}(e,t,i,a):1,r}function ie(e,t,i,a,n,r){e=e||a.width,t=t||a.height;const{scaleFactor:o,width:c,height:s}=function(e,t,i,a,n){let r,o=i,c=a;if(r=te(e,t,i,a,n),n===O.FIT&&(o=e*r,c=t*r),o&&c&&o*c>P){const i=Math.sqrt(P/(o*c));o*=i,c*=i,r=te(e,t,o,c,n)}return{scaleFactor:r,width:o,height:c}}(e,t,a.width*n,a.height*n,i);return function(e,t,i,a,n,r,o){const{optimizedScaleFactor:c,upscaleMethodValue:s,forceUSM:u}=function(e,t,i,a){if("auto"===a)return function(e,t){const i=oe(e,t);return{optimizedScaleFactor:k[i].maxUpscale,upscaleMethodValue:C.classic,forceUSM:!1}}(e,t);if("super"===a)return function(e){return{optimizedScaleFactor:U(N),upscaleMethodValue:C.super,forceUSM:!(N.includes(e)||e>U(N))}}(i);return function(e,t){const i=oe(e,t);return{optimizedScaleFactor:k[i].maxUpscale,upscaleMethodValue:C.classic,forceUSM:!1}}(e,t)}(e,t,r,n);let h=i,l=a;if(r<=c)return{width:h,height:l,scaleFactor:r,upscaleMethodValue:s,forceUSM:u,cssUpscaleNeeded:!1};switch(o){case O.FILL:h=i*(c/r),l=a*(c/r);break;case O.FIT:h=e*c,l=t*c}return{width:h,height:l,scaleFactor:c,upscaleMethodValue:s,forceUSM:u,cssUpscaleNeeded:!0}}(e,t,c,s,r,o,i)}function ae(e,t,i,a){const n=re(i)||function(e=M.CENTER){return w[e]}(a);return{x:Math.max(0,Math.min(e.width-t.width,n.x*e.width-t.width/2)),y:Math.max(0,Math.min(e.height-t.height,n.y*e.height-t.height/2)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}}function ne(e){return e.alignment&&y[e.alignment]||y[M.CENTER]}function re(e){let t;return!e||"number"!=typeof e.x||isNaN(e.x)||"number"!=typeof e.y||isNaN(e.y)||(t={x:ce(Math.max(0,Math.min(100,e.x))/100,2),y:ce(Math.max(0,Math.min(100,e.y))/100,2)}),t}function oe(e,t){const i=e*t;return i>k[v.HIGH].size?v.HIGH:i>k[v.MEDIUM].size?v.MEDIUM:i>k[v.LOW].size?v.LOW:v.TINY}function ce(e,t){const i=Math.pow(10,t||0);return(e*i/i).toFixed(t)}function se(e){return e&&e.upscaleMethod&&R[e.upscaleMethod.toUpperCase()]||R.AUTO}function ue(e,t){const i=Z(e)||q(e);return ee(e)===B.GIF||i&&t}const he={isMobile:!1},le=function(e){return he[e]};function de(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);e=t&&i,he["isMobile"]=e}var e}function ge(e,t){const i={css:{container:{}}},{css:a}=i,{fittingType:n}=e;switch(n){case b.ORIGINAL_SIZE:case b.LEGACY_ORIGINAL_SIZE:case b.LEGACY_STRIP_ORIGINAL_SIZE:a.container.backgroundSize="auto",a.container.backgroundRepeat="no-repeat";break;case b.SCALE_TO_FIT:case b.LEGACY_STRIP_SCALE_TO_FIT:a.container.backgroundSize="contain",a.container.backgroundRepeat="no-repeat";break;case b.STRETCH:a.container.backgroundSize="100% 100%",a.container.backgroundRepeat="no-repeat";break;case b.SCALE_TO_FILL:case b.LEGACY_STRIP_SCALE_TO_FILL:a.container.backgroundSize="cover",a.container.backgroundRepeat="no-repeat";break;case b.TILE_HORIZONTAL:case b.LEGACY_STRIP_TILE_HORIZONTAL:a.container.backgroundSize="auto",a.container.backgroundRepeat="repeat-x";break;case b.TILE_VERTICAL:case b.LEGACY_STRIP_TILE_VERTICAL:a.container.backgroundSize="auto",a.container.backgroundRepeat="repeat-y";break;case b.TILE:case b.LEGACY_STRIP_TILE:a.container.backgroundSize="auto",a.container.backgroundRepeat="repeat";break;case b.LEGACY_STRIP_FIT_AND_TILE:a.container.backgroundSize="contain",a.container.backgroundRepeat="repeat";break;case b.FIT_AND_TILE:case b.LEGACY_BG_FIT_AND_TILE:a.container.backgroundSize="auto",a.container.backgroundRepeat="repeat";break;case b.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:a.container.backgroundSize="auto",a.container.backgroundRepeat="repeat-x";break;case b.LEGACY_BG_FIT_AND_TILE_VERTICAL:a.container.backgroundSize="auto",a.container.backgroundRepeat="repeat-y";break;case b.LEGACY_BG_NORMAL:a.container.backgroundSize="auto",a.container.backgroundRepeat="no-repeat"}switch(t.alignment){case M.CENTER:a.container.backgroundPosition="center center";break;case M.LEFT:a.container.backgroundPosition="left center";break;case M.RIGHT:a.container.backgroundPosition="right center";break;case M.TOP:a.container.backgroundPosition="center top";break;case M.BOTTOM:a.container.backgroundPosition="center bottom";break;case M.TOP_RIGHT:a.container.backgroundPosition="right top";break;case M.TOP_LEFT:a.container.backgroundPosition="left top";break;case M.BOTTOM_RIGHT:a.container.backgroundPosition="right bottom";break;case M.BOTTOM_LEFT:a.container.backgroundPosition="left bottom"}return i}const pe={[M.CENTER]:"center",[M.TOP]:"top",[M.TOP_LEFT]:"top left",[M.TOP_RIGHT]:"top right",[M.BOTTOM]:"bottom",[M.BOTTOM_LEFT]:"bottom left",[M.BOTTOM_RIGHT]:"bottom right",[M.LEFT]:"left",[M.RIGHT]:"right"},_e={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function Te(e,t){const i={css:{container:{},img:{}}},{css:a}=i,{fittingType:n}=e,r=t.alignment;switch(a.container.position="relative",n){case b.ORIGINAL_SIZE:case b.LEGACY_ORIGINAL_SIZE:e.parts&&e.parts.length?(a.img.width=e.parts[0].width,a.img.height=e.parts[0].height):(a.img.width=e.src.width,a.img.height=e.src.height);break;case b.SCALE_TO_FIT:case b.LEGACY_FIT_WIDTH:case b.LEGACY_FIT_HEIGHT:case b.LEGACY_FULL:a.img.width=t.width,a.img.height=t.height,a.img.objectFit="contain",a.img.objectPosition=pe[r]||"unset";break;case b.LEGACY_BG_NORMAL:a.img.width="100%",a.img.height="100%",a.img.objectFit="none",a.img.objectPosition=pe[r]||"unset";break;case b.STRETCH:a.img.width=t.width,a.img.height=t.height,a.img.objectFit="fill";break;case b.SCALE_TO_FILL:a.img.width=t.width,a.img.height=t.height,a.img.objectFit="cover"}if("number"==typeof a.img.width&&"number"==typeof a.img.height&&(a.img.width!==t.width||a.img.height!==t.height)){const e=Math.round((t.height-a.img.height)/2),i=Math.round((t.width-a.img.width)/2);Object.assign(a.img,_e,function(e,t,i){return{[M.TOP_LEFT]:{top:0,left:0},[M.TOP_RIGHT]:{top:0,right:0},[M.TOP]:{top:0,left:t},[M.BOTTOM_LEFT]:{bottom:0,left:0},[M.BOTTOM_RIGHT]:{bottom:0,right:0},[M.BOTTOM]:{bottom:0,left:t},[M.RIGHT]:{top:e,right:0},[M.LEFT]:{top:e,left:0},[M.CENTER]:{width:i.width,height:i.height,objectFit:"none"}}}(e,i,t)[r])}return i}function me(e,t){const i={css:{container:{}},attr:{container:{},img:{}}},{css:a,attr:n}=i,{fittingType:r}=e,o=t.alignment,{width:c,height:s}=e.src;let u;switch(a.container.position="relative",r){case b.ORIGINAL_SIZE:case b.LEGACY_ORIGINAL_SIZE:case b.TILE:e.parts&&e.parts.length?(n.img.width=e.parts[0].width,n.img.height=e.parts[0].height):(n.img.width=c,n.img.height=s),n.img.preserveAspectRatio="xMidYMid slice";break;case b.SCALE_TO_FIT:case b.LEGACY_FIT_WIDTH:case b.LEGACY_FIT_HEIGHT:case b.LEGACY_FULL:n.img.width="100%",n.img.height="100%",n.img.transform="",n.img.preserveAspectRatio="";break;case b.STRETCH:n.img.width=t.width,n.img.height=t.height,n.img.x=0,n.img.y=0,n.img.transform="",n.img.preserveAspectRatio="none";break;case b.SCALE_TO_FILL:z(e.src.id)?(n.img.width=t.width,n.img.height=t.height):(u=function(e,t,i,a,n){const r=te(e,t,i,a,n);return{width:Math.round(e*r),height:Math.round(t*r)}}(c,s,t.width,t.height,O.FILL),n.img.width=u.width,n.img.height=u.height),n.img.x=0,n.img.y=0,n.img.transform="",n.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof n.img.width&&"number"==typeof n.img.height&&(n.img.width!==t.width||n.img.height!==t.height)){let e,i,a=0,c=0;r===b.TILE?(e=t.width%n.img.width,i=t.height%n.img.height):(e=t.width-n.img.width,i=t.height-n.img.height);const s=Math.round(e/2),u=Math.round(i/2);switch(o){case M.TOP_LEFT:a=0,c=0;break;case M.TOP:a=s,c=0;break;case M.TOP_RIGHT:a=e,c=0;break;case M.LEFT:a=0,c=u;break;case M.CENTER:a=s,c=u;break;case M.RIGHT:a=e,c=u;break;case M.BOTTOM_LEFT:a=0,c=i;break;case M.BOTTOM:a=s,c=i;break;case M.BOTTOM_RIGHT:a=e,c=i}n.img.x=a,n.img.y=c}return n.container.width=t.width,n.container.height=t.height,n.container.viewBox=[0,0,t.width,t.height].join(" "),i}function fe(e,t,i){let a;switch(t.crop&&(a=function(e,t){const i=Math.max(0,Math.min(e.width,t.x+t.width)-Math.max(0,t.x)),a=Math.max(0,Math.min(e.height,t.y+t.height)-Math.max(0,t.y));return i&&a&&(e.width!==i||e.height!==a)?{x:Math.max(0,t.x),y:Math.max(0,t.y),width:i,height:a}:null}(t,t.crop),a&&(e.src.width=a.width,e.src.height=a.height,e.src.isCropped=!0,e.parts.push(Le(a)))),e.fittingType){case b.SCALE_TO_FIT:case b.LEGACY_FIT_WIDTH:case b.LEGACY_FIT_HEIGHT:case b.LEGACY_FULL:case b.FIT_AND_TILE:case b.LEGACY_BG_FIT_AND_TILE:case b.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case b.LEGACY_BG_FIT_AND_TILE_VERTICAL:case b.LEGACY_BG_NORMAL:e.parts.push(Ie(e,i));break;case b.SCALE_TO_FILL:e.parts.push(function(e,t){const i=ie(e.src.width,e.src.height,O.FILL,t,e.devicePixelRatio,e.upscaleMethod),a=re(e.focalPoint);return{transformType:a?O.FILL_FOCAL:O.FILL,width:Math.round(i.width),height:Math.round(i.height),alignment:ne(t),focalPointX:a&&a.x,focalPointY:a&&a.y,upscale:i.scaleFactor>1,forceUSM:i.forceUSM,scaleFactor:i.scaleFactor,cssUpscaleNeeded:i.cssUpscaleNeeded,upscaleMethodValue:i.upscaleMethodValue}}(e,i));break;case b.STRETCH:e.parts.push(function(e,t){const i=te(e.src.width,e.src.height,t.width,t.height,O.FILL),a={...t};return a.width=e.src.width*i,a.height=e.src.height*i,Ie(e,a)}(e,i));break;case b.TILE_HORIZONTAL:case b.TILE_VERTICAL:case b.TILE:case b.LEGACY_ORIGINAL_SIZE:case b.ORIGINAL_SIZE:a=ae(e.src,i,e.focalPoint,i.alignment),e.src.isCropped?(Object.assign(e.parts[0],a),e.src.width=a.width,e.src.height=a.height):e.parts.push(Le(a));break;case b.LEGACY_STRIP_TILE_HORIZONTAL:case b.LEGACY_STRIP_TILE_VERTICAL:case b.LEGACY_STRIP_TILE:case b.LEGACY_STRIP_ORIGINAL_SIZE:e.parts.push(function(e){return{transformType:O.LEGACY_CROP,width:Math.round(e.width),height:Math.round(e.height),alignment:ne(e),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(i));break;case b.LEGACY_STRIP_SCALE_TO_FIT:case b.LEGACY_STRIP_FIT_AND_TILE:e.parts.push(function(e){return{transformType:O.FIT,width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(i));break;case b.LEGACY_STRIP_SCALE_TO_FILL:e.parts.push(function(e){return{transformType:O.LEGACY_FILL,width:Math.round(e.width),height:Math.round(e.height),alignment:ne(e),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(i))}}function Ie(e,t){const i=ie(e.src.width,e.src.height,O.FIT,t,e.devicePixelRatio,e.upscaleMethod);return{transformType:!e.src.width||!e.src.height?O.FIT:O.FILL,width:Math.round(i.width),height:Math.round(i.height),alignment:y.center,upscale:i.scaleFactor>1,forceUSM:i.forceUSM,scaleFactor:i.scaleFactor,cssUpscaleNeeded:i.cssUpscaleNeeded,upscaleMethodValue:i.upscaleMethodValue}}function Le(e){return{transformType:O.CROP,x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function Ee(e,t){t=t||{},e.quality=function(e,t){const i=e.fileType===B.PNG,a=e.fileType===B.JPG,n=e.fileType===B.WEBP,r=e.fileType===B.AVIF,o=a||i||n||r;if(o){const a=U(e.parts),n=(c=a.width,s=a.height,k[oe(c,s)].quality);let r=t.quality&&t.quality>=5&&t.quality<=90?t.quality:n;return r=i?r+5:r,r}var c,s;return 0}(e,t),e.progressive=function(e){return!1!==e.progressive}(t),e.watermark=function(e){return e.watermark}(t),e.autoEncode=t.autoEncode??!0,e.encoding=t?.encoding,e.unsharpMask=function(e,t){if(function(e){const t="number"==typeof(e=e||{}).radius&&!isNaN(e.radius)&&e.radius>=.1&&e.radius<=500,i="number"==typeof e.amount&&!isNaN(e.amount)&&e.amount>=0&&e.amount<=10,a="number"==typeof e.threshold&&!isNaN(e.threshold)&&e.threshold>=0&&e.threshold<=255;return t&&i&&a}(t.unsharpMask))return{radius:ce(t.unsharpMask?.radius,2),amount:ce(t.unsharpMask?.amount,2),threshold:ce(t.unsharpMask?.threshold,2)};if(("number"!=typeof(i=(i=t.unsharpMask)||{}).radius||isNaN(i.radius)||0!==i.radius||"number"!=typeof i.amount||isNaN(i.amount)||0!==i.amount||"number"!=typeof i.threshold||isNaN(i.threshold)||0!==i.threshold)&&function(e){const t=U(e.parts);return!(t.scaleFactor>=1)||t.forceUSM||t.transformType===O.FIT}(e))return S;var i;return}(e,t),e.filters=function(e){const t=e.filters||{},i={};Ae(t[x.CONTRAST],-100,100)&&(i[x.CONTRAST]=t[x.CONTRAST]);Ae(t[x.BRIGHTNESS],-100,100)&&(i[x.BRIGHTNESS]=t[x.BRIGHTNESS]);Ae(t[x.SATURATION],-100,100)&&(i[x.SATURATION]=t[x.SATURATION]);Ae(t[x.HUE],-180,180)&&(i[x.HUE]=t[x.HUE]);Ae(t[x.BLUR],0,100)&&(i[x.BLUR]=t[x.BLUR]);return i}(t)}function Ae(e,t,i){return"number"==typeof e&&!isNaN(e)&&0!==e&&e>=t&&e<=i}function be(e,t,i,a){const n=function(e){return e?.isSEOBot??!1}(a),r=K(t.id),o=function(e,t){const i=/\.([^.]*)$/,a=new RegExp(`(${J.concat(X).join("|")})`,"g");if(t&&t.length){let e=t;const n=t.match(i);return n&&$.includes(n[1])&&(e=t.replace(i,"")),encodeURIComponent(e).replace(a,Q)}const n=e.match(/\/(.*?)$/);return(n?n[1]:e).replace(i,"")}(t.id,t.name),c=n?1:function(e){return Math.min(e.pixelAspectRatio||1,f)}(i),s=ee(t.id),u=s,h=z(t.id,a?.hasAnimation,a?.allowAnimatedTransform),l={fileName:o,fileExtension:s,fileType:r,fittingType:e,preferredExtension:u,src:{id:t.id,width:t.width,height:t.height,isCropped:!1,isAnimated:ue(t.id,a?.hasAnimation)},focalPoint:{x:t.focalPoint&&t.focalPoint.x,y:t.focalPoint&&t.focalPoint.y},parts:[],devicePixelRatio:c,quality:0,upscaleMethod:se(a),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:h};return h&&(fe(l,t,i),Ee(l,a)),l}function Oe(e,t,i){const a={...i},n=le("isMobile");switch(e){case b.LEGACY_BG_FIT_AND_TILE:case b.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case b.LEGACY_BG_FIT_AND_TILE_VERTICAL:case b.LEGACY_BG_NORMAL:const e=n?E:I,i=n?A:L;a.width=Math.min(e,t.width),a.height=Math.min(i,Math.round(a.width/(t.width/t.height))),a.pixelAspectRatio=1}return a}const Me=Y`fit/w_${"width"},h_${"height"}`,we=Y`fill/w_${"width"},h_${"height"},al_${"alignment"}`,ye=Y`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,Ge=Y`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,Re=Y`crop/w_${"width"},h_${"height"},al_${"alignment"}`,Ce=Y`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Se=Y`,lg_${"upscaleMethodValue"}`,Fe=Y`,q_${"quality"}`,Pe=Y`,quality_auto`,Ne=Y`,usm_${"radius"}_${"amount"}_${"threshold"}`,ke=Y`,bl`,ve=Y`,wm_${"watermark"}`,xe={[x.CONTRAST]:Y`,con_${"contrast"}`,[x.BRIGHTNESS]:Y`,br_${"brightness"}`,[x.SATURATION]:Y`,sat_${"saturation"}`,[x.HUE]:Y`,hue_${"hue"}`,[x.BLUR]:Y`,blur_${"blur"}`},Be=Y`,enc_auto`,He=Y`,enc_avif`,Ye=Y`,enc_pavif`,Ue=Y`,pstr`;function $e(e,t,i,a={},n){if(z(t.id,a?.hasAnimation,a?.allowAnimatedTransform)){if(Z(t.id)||q(t.id)){const{alignment:r,...o}=i;t.focalPoint={x:void 0,y:void 0},delete t?.crop,n=be(e,t,o,a)}else n=n||be(e,t,i,a);return function(e){const t=[];e.parts.forEach((e=>{switch(e.transformType){case O.CROP:t.push(Ge(e));break;case O.LEGACY_CROP:t.push(Re(e));break;case O.LEGACY_FILL:let i=Ce(e);e.upscale&&(i+=Se(e)),t.push(i);break;case O.FIT:let a=Me(e);e.upscale&&(a+=Se(e)),t.push(a);break;case O.FILL:let n=we(e);e.upscale&&(n+=Se(e)),t.push(n);break;case O.FILL_FOCAL:let r=ye(e);e.upscale&&(r+=Se(e)),t.push(r)}}));let i=t.join("/");return e.quality&&(i+=Fe(e)),e.unsharpMask&&(i+=Ne(e.unsharpMask)),e.progressive||(i+=ke(e)),e.watermark&&(i+=ve(e)),e.filters&&(i+=Object.keys(e.filters).map((t=>xe[t](e.filters))).join("")),e.fileType!==B.GIF&&(e.encoding===H.AVIF?(i+=He(e),i+=Pe(e)):e.encoding===H.PAVIF?(i+=Ye(e),i+=Pe(e)):e.autoEncode&&(i+=Be(e))),e.src?.isAnimated&&e.transformed&&(i+=Ue(e)),`${e.src.id}/${m}/${i}/${e.fileName}.${e.preferredExtension}`}(n)}return t.id}const De={[M.CENTER]:"50% 50%",[M.TOP_LEFT]:"0% 0%",[M.TOP_RIGHT]:"100% 0%",[M.TOP]:"50% 0%",[M.BOTTOM_LEFT]:"0% 100%",[M.BOTTOM_RIGHT]:"100% 100%",[M.BOTTOM]:"50% 100%",[M.RIGHT]:"100% 50%",[M.LEFT]:"0% 50%"},je=Object.entries(De).reduce(((e,[t,i])=>(e[i]=t,e)),{}),ze=[b.TILE,b.TILE_HORIZONTAL,b.TILE_VERTICAL,b.LEGACY_BG_FIT_AND_TILE,b.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,b.LEGACY_BG_FIT_AND_TILE_VERTICAL],Ve=[b.LEGACY_ORIGINAL_SIZE,b.ORIGINAL_SIZE,b.LEGACY_BG_NORMAL];function Ze(e,t,{width:i,height:a}){return e===b.TILE&&t.width>i&&t.height>a}function We(e,{width:t,height:i}){if(!t||!i){const a=t||Math.min(980,e.width),n=a/e.width;return{width:a,height:i||e.height*n}}return{width:t,height:i}}function qe(e,t,i,a="center"){const n={img:{},container:{}};if(e===b.SCALE_TO_FILL){const e=t.focalPoint&&function(e){const t=`${e.x}% ${e.y}%`;return je[t]||""}(t.focalPoint),r=e||a;t.focalPoint&&!e?n.img={objectPosition:Je(t,i,t.focalPoint)}:n.img={objectPosition:De[r]}}else[b.LEGACY_ORIGINAL_SIZE,b.ORIGINAL_SIZE].includes(e)?n.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:ze.includes(e)&&(n.container={backgroundSize:`${t.width}px ${t.height}px`});return n}function Je(e,t,i){const{width:a,height:n}=e,{width:r,height:o}=t,{x:c,y:s}=i;if(!r||!o)return`${c}% ${s}%`;const u=Math.max(r/a,o/n),h=a*u,l=n*u,d=Math.max(0,Math.min(h-r,h*(c/100)-r/2)),g=Math.max(0,Math.min(l-o,l*(s/100)-o/2));return`${d&&Math.floor(d/(h-r)*100)}% ${g&&Math.floor(g/(l-o)*100)}%`}const Xe={width:"100%",height:"100%"};function Qe(e,t,i,a={}){const{autoEncode:n=!0,isSEOBot:r,shouldLoadHQImage:o,hasAnimation:c,allowAnimatedTransform:s,encoding:u}=a;if(!j(e,t,i))return F;const h=void 0===s||s,l=z(t.id,c,h);if(!l||o)return Ke(e,t,i,{...a,autoEncode:n,useSrcset:l});const d={...i,...We(t,i)},{alignment:g,htmlTag:p}=d,_=Ze(e,t,d),T=function(e,t,{width:i,height:a},n=!1){if(n)return{width:i,height:a};const r=!Ve.includes(e),o=Ze(e,t,{width:i,height:a}),c=!o&&ze.includes(e),s=c?t.width:i,u=c?t.height:a,h=r?function(e,t){return e>900?t?.05:.15:e>500?t?.1:.18:e>200?.25:1}(s,V(t.id)):1;return{width:o?1920:s*h,height:u*h}}(e,t,d,r),m=function(e,t,i){return i?0:ze.includes(t)?1:e>200?2:3}(d.width,e,r),f=function(e,t){const i=ze.includes(e)&&!t;return e===b.SCALE_TO_FILL||i?b.SCALE_TO_FIT:e}(e,_),I=qe(e,t,i,g),{uri:L}=Ke(f,t,{...T,alignment:g,htmlTag:p},{autoEncode:n,filters:m?{blur:m}:{},hasAnimation:c,allowAnimatedTransform:h,encoding:u}),{attr:E={},css:A}=Ke(e,t,{...d,alignment:g,htmlTag:p},{});return A.img=A.img||{},A.container=A.container||{},Object.assign(A.img,I.img,Xe),Object.assign(A.container,I.container),{uri:L,css:A,attr:E,transformed:!0}}function Ke(e,t,i,a){let n={};if(j(e,t,i)){const r=Oe(e,t,i),o=be(e,t,r,a);n.uri=$e(e,t,r,a,o),a?.useSrcset&&(n.srcset=function(e,t,i,a,n){const r=i.pixelAspectRatio||1;return{dpr:[`${1===r?n.uri:$e(e,t,{...i,pixelAspectRatio:1},a)} 1x`,`${2===r?n.uri:$e(e,t,{...i,pixelAspectRatio:2},a)} 2x`]}}(e,t,r,a,n)),Object.assign(n,function(e,t){let i;return i=t.htmlTag===G.BG?ge:t.htmlTag===G.SVG?me:Te,i(e,t)}(o,r),{transformed:o.transformed})}else n=F;return n}const et="https://static.wixstatic.com/media/";"undefined"!=typeof window&&window.devicePixelRatio;de();de();const tt=et,{STATIC_MEDIA_URL:it}=e,at=({fittingType:e,src:t,target:i,options:a})=>{const n=Qe(e,t,i,{...a,autoEncode:!0});return n?.uri&&!/^[a-z]+:/.test(n.uri)&&(n.uri=`${it}${n.uri}`),n},nt=/^[a-z]+:/,rt=e=>{const{id:t,containerId:i,uri:a,alt:n,name:o="",role:c,width:s,height:u,displayMode:h,devicePixelRatio:l,quality:d,alignType:g,bgEffectName:p="",focalPoint:_,upscaleMethod:m,className:f="",crop:I,imageStyles:L={},targetWidth:E,targetHeight:A,targetScale:b,onLoad:O=()=>{},onError:M=()=>{},shouldUseLQIP:w,containerWidth:y,containerHeight:G,getPlaceholder:R,isInFirstFold:C,placeholderTransition:S,socialAttrs:F,isSEOBot:P,skipMeasure:N,hasAnimation:k,encoding:v}=e,x=r.useRef(null);let B="";const H="blur"===S,Y=r.useRef(null);if(!Y.current)if(R||w||C||P){const e={upscaleMethod:m,...d||{},shouldLoadHQImage:C,isSEOBot:P,hasAnimation:k,encoding:v};Y.current=(R||at)({fittingType:h,src:{id:a,width:s,height:u,crop:I,name:o,focalPoint:_},target:{width:y,height:G,alignment:g,htmlTag:"img"},options:e}),B=!Y.current.transformed||C||P?"":"true"}else Y.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const U=!P&&(R||w)&&!C&&Y.current.transformed,$=r.useMemo((()=>JSON.stringify({containerId:i,...i&&{containerId:i},...g&&{alignType:g},...N&&{skipMeasure:!0},displayMode:h,...y&&{targetWidth:y},...G&&{targetHeight:G},...E&&{targetWidth:E},...A&&{targetHeight:A},...b&&{targetScale:b},isLQIP:U,isSEOBot:P,lqipTransition:S,encoding:v,imageData:{width:s,height:u,uri:a,name:o,displayMode:h,hasAnimation:k,...d&&{quality:d},...l&&{devicePixelRatio:l},..._&&{focalPoint:_},...I&&{crop:I},...m&&{upscaleMethod:m}}})),[i,g,N,h,y,G,E,A,b,U,P,S,v,s,u,a,o,k,d,l,_,I,m]),D=Y.current,j=D?.uri,z=D?.srcset,V=D.css?.img,Z=`${T} ${f}`;r.useEffect((()=>{const e=x.current;O&&e?.currentSrc&&e?.complete&&O({target:e})}),[]);const W=D&&!D?.transformed?`max(${s}px, 100%)`:E?`${E}px`:null;return r.createElement("wow-image",{id:t,class:Z,"data-image-info":$,"data-motion-part":`BG_IMG ${i}`,"data-bg-effect-name":p,"data-has-ssr-src":B,"data-animate-blur":!P&&U&&H?"":void 0,style:W?{"--wix-img-max-width":W}:{}},r.createElement("img",{src:j,ref:x,alt:n||"",role:c,style:{...V,...L},onLoad:O,onError:M,width:y||void 0,height:G||void 0,...F,srcSet:C?z?.dpr?.map((e=>nt.test(e)?e:`${it}${e}`)).join(", "):void 0,fetchpriority:C?"high":void 0,loading:!1===C?"lazy":void 0,suppressHydrationWarning:!0}))};var ot="Tj01hh";function ct(e){var t,i,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{var t,a;const{id:n,alt:o,role:c,className:s,imageStyles:u={},targetWidth:h,targetHeight:l,onLoad:d,onError:g,containerWidth:p,containerHeight:_,isInFirstFold:T,socialAttrs:m,skipMeasure:f,responsiveImageProps:I,zoomedImageResponsiveOverride:L,displayMode:E}=e,A=h||p,b=l||_,{fallbackSrc:O,srcset:M,sources:w,css:y}=I||{},{width:G,height:R,...C}=(null==I||null==(t=I.css)?void 0:t.img)||{},S="original_size"===E?null==I||null==(a=I.css)?void 0:a.img:C;var F;return O&&M&&y?r.createElement("img",i()({fetchpriority:T?"high":void 0,loading:!1===T?"lazy":void 0,sizes:A+"px",srcSet:f?null==L?void 0:L.srcset:null==I?void 0:I.srcset,id:n,src:O,alt:o||"",role:c,style:{...u,...f?{...null==L||null==(F=L.css)?void 0:F.img}:{...S}},onLoad:d,onError:g,className:st(s,ot),width:A,height:b},m)):O&&w&&y?r.createElement("picture",null,w.map((e=>{let{srcset:t,media:i,sizes:a}=e;return r.createElement("source",{key:i,srcSet:t,media:i,sizes:a})})),r.createElement("img",i()({fetchpriority:T?"high":void 0,loading:!1===T?"lazy":void 0,id:n,src:w[0].fallbackSrc,alt:o||"",role:c,style:{...u,objectFit:w[0].imgStyle.objectFit,objectPosition:w[0].imgStyle.objectPosition},onLoad:d,onError:g,className:st(s,ot),width:A,height:b},m))):r.createElement(rt,e)};const ht={root:"linkElement"},lt=(e,t)=>{const{href:a,role:n,target:o,rel:c,className:s="",children:d,linkPopupId:g,anchorDataId:p,anchorCompId:T,tabIndex:m,dataTestId:f=ht.root,title:I,onClick:L,onDoubleClick:E,onMouseEnter:A,onMouseLeave:b,onFocus:O,onFocusCapture:M,onBlurCapture:w,"aria-live":y,"aria-disabled":G,"aria-label":R,"aria-labelledby":C,"aria-pressed":S,"aria-expanded":F,"aria-describedby":P,"aria-haspopup":N,"aria-current":k,dataPreview:v,dataPart:x}=e,B=void 0!==e.activateByKey?e.activateByKey:(e=>e?"SpaceOrEnter":"Space")(g);let H;switch(B){case"Enter":H=h;break;case"Space":H=u;break;case"SpaceOrEnter":H=l;break;default:H=void 0}return void 0!==a||g?r.createElement("a",i()({},_(e),{"data-testid":f,"data-popupid":g,"data-anchor":p,"data-anchor-comp-id":T,"data-preview":v,"data-part":x,href:a||void 0,target:o,role:g?"button":n,rel:c,className:s,onKeyDown:H,"aria-live":y,"aria-disabled":G,"aria-label":R,"aria-labelledby":C,"aria-pressed":S,"aria-expanded":F,"aria-haspopup":N,"aria-describedby":P,"aria-current":k,title:I,onClick:L,onMouseEnter:A,onMouseLeave:b,onDoubleClick:E,onFocus:O,onFocusCapture:M,onBlurCapture:w,ref:t,tabIndex:g?0:m}),d):r.createElement("div",i()({},_(e),{"data-testid":f,"data-preview":v,"data-part":x,className:s,tabIndex:m,"aria-label":R,"aria-labelledby":C,"aria-haspopup":N,"aria-disabled":G,"aria-expanded":F,title:I,role:n,onClick:L,onDoubleClick:E,onMouseEnter:A,onMouseLeave:b,ref:t}),d)};var dt=r.forwardRef(lt);var gt="LhCmu6",pt="ikjXKb",_t="MuQWVh",Tt="F9vrFF";var mt=e=>{const{id:t,title:a,image:n,link:o,className:c,reportBiOnClick:s,onMouseEnter:u,onMouseLeave:h,ariaAttributes:l,a11y:d,translations:g}=e,{ariaAttributes:T}=r.useMemo((()=>{var e;return p({ariaAttributes:{...d,...l,label:(null==l?void 0:l.label)||(null==d?void 0:d.label)||a||(null==o||null==(e=o.docInfo)?void 0:e.name)||g.ariaLabel}})}),[d,l,a,o,g]);return r.createElement("div",i()({id:t},_(e),{onClick:s,onMouseEnter:u,onMouseLeave:h,className:c}),r.createElement(dt,i()({},o,{className:gt,title:a||n.alt},T),r.createElement("div",{className:pt,"aria-hidden":"true"},r.createElement(ut,i()({},n,{id:"image-"+t,className:_t,containerId:t,displayMode:"fit",name:""}))),a&&r.createElement("span",{className:Tt},a)))};const ft=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)),It=e=>"linkPopupId"in e,Lt=(e,t)=>{if(It(e))return e.linkPopupId;{const{pagesMap:i,mainPageId:a}=t||{};if(!i)return;const n=new URL(e.href??"");let r=Object.values(i).find((({pageUriSEO:e})=>!!e&&n.pathname?.includes(e)));return r||(r=a?i[a]:void 0),r?.pageId}},Et=e=>{if(void 0!==e)return null===e?"None":e.type},At=(e,t)=>{if(!e?.type)return;const{type:i}=e;switch(i){case"AnchorLink":return e.anchorDataId;case"DocumentLink":return e.docInfo?.name;case"PageLink":const i=Lt(e,t);return i&&t?.pagesMap?.[i]?.title;default:return e.href}},bt=(e,t,i)=>{const{link:a,value:n,details:r,actionName:o,elementType:c,trackClicksAnalytics:s,pagesMetadata:u,...h}=t;if(!s||"function"!=typeof e)return;const l=u&&{...u,pagesMap:window.viewerModel?.siteFeaturesConfigs?.router?.pagesMap},d=((e,t)=>{if(!e?.type)return;const{type:i}=e;switch(i){case"AnchorLink":return(e=>"anchorDataId"in e&&("SCROLL_TO_TOP"===e.anchorDataId||"SCROLL_TO_BOTTOM"===e.anchorDataId))(e)?void 0:{id:e.anchorDataId};case"DocumentLink":return{id:e.docInfo?.docId};case"PageLink":return{id:Lt(e,t),isLightbox:It(e)};default:return}})(a,l),g=r||d?JSON.stringify({...d,...r}):void 0;e({src:76,evid:1113,...{...h,bl:navigator.language,url:window.location.href,details:g,elementType:c??"Unknown",actionName:o??Et(a),value:n??At(a,l)}},{endpoint:"pa",...i})};var Ot;!function(e){e.Text="Text",e.Menu="Menu",e.Image="Image",e.Input="Input",e.Login="Login",e.Button="Button",e.Social="Social",e.Gallery="Gallery",e.Community="Community",e.Decorative="Decorative",e.MenuAndSearch="MenuAndSearch",e.MenuAndAnchor="MenuAndAnchor"}(Ot||(Ot={}));var Mt;const wt={DocumentMedia:{component:mt,controller:(Mt=e=>{let{mapperProps:t,stateValues:i}=e;const{compId:a,language:n,fullNameCompType:r,trackClicksAnalytics:o,...c}=t;return{...c,reportBiOnClick:()=>{var e;const{link:c,title:s,image:u}=t;bt(i.reportBi,{language:n,trackClicksAnalytics:o,element_id:a,elementTitle:s,value:null==(e=c.docInfo)?void 0:e.name,details:{uri:u.uri},elementType:r,elementGroup:Ot.Button})}}},{useComponentProps:(e,t,i)=>{const a=(e=>({...e,updateStyles:t=>{const i=Object.entries(t).reduce(((e,[t,i])=>{return{...e,[(a=t,a.startsWith("--")?t:ft(t))]:void 0===i?null:i};var a}),{});e.updateStyles(i)}}))(i);return Mt({mapperProps:e,stateValues:t,controllerUtils:a})}})}}}(),n}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[DocumentMedia].c1806171.bundle.min.js.map